package xyz.xiaomuyu.moment_read_app.util;

import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TimeUtil {
    public static String getNowDate() {
        Date currentTime = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        String dateString = formatter.format(currentTime);
        ParsePosition pos = new ParsePosition(8);
        System.out.println(dateString);
        return dateString;

//        Date currentTime_2 = formatter.parse(dateString, pos);
//        return currentTime_2;

    }

}